package com.xin.di.uav.applet.rest;

import com.xin.di.uav.applet.po.Dictionary;
import com.xin.di.uav.applet.service.IDictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 设置字典表 前端控制器
 * </p>
 *
 * @author LTQ
 * @since 2023-09-04
 */
@RestController
@RequestMapping("/sys/dictionary/")
public class DictionaryRest {

    @Autowired
    private IDictionaryService iDictionaryService;
    @GetMapping("get-set")
    public Dictionary getBySubject(String subject) {
        return iDictionaryService.getBySubject(subject);
    }

    public List<Dictionary> getListBySubject(String subject) {
        return iDictionaryService.getListBySubject(subject);
    }
}
